package com.fx.eduservice.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.fx.commonuntils.ReturnMessage;
import com.fx.commonuntils.ReturnMessageUtils;
import com.fx.eduservice.entity.vo.EduVideo;
import com.fx.eduservice.mapper.EduVideoMapper;
import com.fx.eduservice.service.EduVideoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 课程视频 服务实现类
 * </p>
 *
 * @author testjava
 * @since 2020-11-07
 */
@Service
public class EduVideoServiceImpl extends ServiceImpl<EduVideoMapper, EduVideo> implements EduVideoService {

    @Override
    public ReturnMessage<Object> deleteVideoByCoursmId(String coursmId) {

        QueryWrapper<EduVideo> EdoWrapper = new QueryWrapper<>();

        EdoWrapper.eq("course_id",coursmId);
        this.remove(EdoWrapper);


        return ReturnMessageUtils.success();
    }
}
